<%@ page language="java" contentType="text/html; charset=utf-8"  
import="com.brother.model.*,java.util.*" pageEncoding="utf-8"%>
<jsp:useBean id="service" class="com.brother.service.TrackerService"></jsp:useBean>
<%

com.brother.model.Customer loginUser = (com.brother.model.Customer)session.getAttribute(com.brother.Constants.LOGIN_SESSTION_NAME);
if(loginUser ==null){
	return;
}

String query = request.getParameter("query");

List<Tracker> trackers = new ArrayList();

trackers.addAll(service.findChildrenTracker(loginUser.getUserid(),null,null, query));



out.print("[");
for(int i = 0; i < trackers.size(); i++){
	out.println("["); 
	out.print("'"+trackers.get(i).getTrackerid()+"',");
	out.print("'"+trackers.get(i).getUserTrackerId()+"'");
	out.print("]");
	if(i < trackers.size() - 1){
		out.print(",");
	}	
}
out.print("]");  

%><%
com.brother.database.DataBase.closeThreadConnection();
%>